package pattern.behavioral.template.simple;

/**
 * 抽象的饮料生成工厂
 * @author: chaoyang.ren  
 * @date:Jun 2, 2017  
 * @time:1:55:13 PM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public abstract class AbstractBeverageFactory {
	
	public final void produce(){
		prepareMaterial();//准备原材料 装瓶、水、糖、各种添加剂
        mix();//混合...  
        bottling();//把...倒进杯子  
	}

	protected abstract void mix();

	private void prepareMaterial() {
		System.out.println("准备原材料");
	}
	
	private void bottling() {
		System.out.println("饮料装瓶");
	}
}

